import { LogUtil } from "../utils";
import { CommonViewEngine } from "./common-view-engine";
import { EditViewEngine } from "./edit-view-engine";
import { GridViewEngine } from "./grid-view-engine";

export class appEngineService{

    /**
     * 获取引擎服务
     *
     * @static
     * @param {string} type
     * @memberof appEngineService
     */
    public static getEngine(type:string){
        switch (type) {
            case 'DEGRIDVIEW':
                return new GridViewEngine();
            case 'DEEDITVIEW':
                return new EditViewEngine();
            case 'DECUSTOMVIEW':
                return new CommonViewEngine();
            default:
                LogUtil.warn(`${type}暂未实现`);
                break;
        }
    }
}